package org.gwu.seuss.ui.commandline;

import org.kohsuke.args4j.CmdLineParser;
import org.kohsuke.args4j.Option;

public abstract class BaseCommandLineArgs {

	@Option(name = "-l", aliases = "-login", usage = "login (required)", required = true)
	private String login;

	@Option(name = "-p", aliases = "-password", usage = "password (required)", required = true)
	private String password;

	@Option(name = "-k", aliases = "-key", usage = "keystore password (required)", required = true)
	private String key;

	@Option(name = "-h", aliases = "-help", usage = "print this message")
	private boolean help = false;

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public boolean isHelp() {
		return help;
	}

	public void setHelp(boolean help) {
		this.help = help;
	}

	public void printError(String message, CmdLineParser parser) {
		// TODO: Print these to console
		System.err.println(message);
		System.err.println("Suess [options...] arguments...");
		parser.printUsage(System.err);
	}

}
